import time
from celery import Celery

brokerUrl = 'amqp://admin:123456@10.4.7.20:5672'
app = Celery('tasks',broker=brokerUrl)

@app.task
def add(x, y):
    print('sleep 2 seconds....')
    time.sleep(2)
    return x + y
